﻿using Shop.Model.DB;
using Shop.Model.Spec;
using Shop.Model.SpecGroup;
using Shop.RemoteModel.GoodsSpec.Model;

namespace Shop.Collect
{
    public interface ISpecGroupCollect
    {
        Dictionary<long, int> SetSpecSort (DBGoodsSpec spec, int sort);
        Dictionary<long, int> SetGroupSort (DBGoodsSpecGroup group, int sort);
        DBGoodsSpec GetSpec (long specId);

        bool SetSpec (DBGoodsSpec spec, GoodsSpecSetDto set);

        SpecDto[] GetSpec (long[] specId);
        GoodsSpecGroup[] Gets (long goodsId);

        GoodsSpecGroup[] Sync (long goodsId, SpecGroup[] groups);
        void DeleteSpec (long[] specId);
        void DeleteSpec (DBGoodsSpec spec);
        long AddSpec (GoodsSpecAddDto goodsSpecAddDto);
        long AddGroup (SpecGroupAdd datum);
        DBGoodsSpecGroup GetGroup (long id);
        void DeleteGroup (DBGoodsSpecGroup group);
        bool SetGroup (DBGoodsSpecGroup group, string name);
    }
}